
<?php if ($view->user instanceof User) { ?>

	<div id="tandem-tabs">
		<?php 
		$count = 1;
		foreach ($view->tabs as $tab_title => $action) {
			echo "
					<a href='{$action->get_direct_link()->__toString()}' class='";
			if ($tab_title == $view->active_tab) {
				echo 'active-tab ';
			}
			if ($count == count($view->tabs)) {
				echo 'last';
			}
			echo "'>$tab_title</a>";
			$count += 1;
		}
		?>
		
		<div style='clear:both;'></div>
		
	</div>

<?php } ?>
	
<?php 

	if (str_endsWith($view->tabcontent, '.php')) {
		require $view->tabcontent;
	}
	else {
		echo $view->tabcontent;
	}
?>
